<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#49b1f5">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon-180x180-yaowan.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-yaowan.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-yaowan.png">
  <link rel="mask-icon" href="/images/logo-yaowan.svg" color="#49b1f5">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/pace-js@1/themes/blue/pace-theme-minimal.css">
  <script src="//cdn.jsdelivr.net/npm/pace-js@1/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"zhouyuqian.com","root":"/","scheme":"Mist","version":"7.7.2","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":"default","style":"flat"},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":true,"color":"#49b1f5","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"valine","storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":"ture"},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="What&#39;s Proxmox VE Proxmox Virtual Environment is an open source server virtualization management solution based on QEMU&#x2F;KVM and LXC. You can manage virtual machines, containers, highly available clust">
<meta property="og:type" content="article">
<meta property="og:title" content="Proxmox VE 安装">
<meta property="og:url" content="https://zhouyuqian.com/2021/08/28/pve/index.html">
<meta property="og:site_name" content="Fitz&#39;s Blog - 快乐学习每一天">
<meta property="og:description" content="What&#39;s Proxmox VE Proxmox Virtual Environment is an open source server virtualization management solution based on QEMU&#x2F;KVM and LXC. You can manage virtual machines, containers, highly available clust">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://pic.zhouyuqian.com/img/202202141121253.png">
<meta property="article:published_time" content="2021-08-27T16:38:20.000Z">
<meta property="article:modified_time" content="2021-08-27T16:38:20.000Z">
<meta property="article:author" content="Fitz">
<meta property="article:tag" content="Geek">
<meta property="article:tag" content="PVE">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://pic.zhouyuqian.com/img/202202141121253.png">

<link rel="canonical" href="https://zhouyuqian.com/2021/08/28/pve/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true
  };
</script>

  <title>Proxmox VE 安装 | Fitz's Blog - 快乐学习每一天</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript><!-- hexo-inject:begin --><!-- hexo-inject:end -->

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Fitz's Blog - 快乐学习每一天</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-fw fa-user"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
        <li class="menu-item menu-item-ariang">

    <a href="/AriaNg/" rel="section"><i class="fa fa-fw fa-cloud-download"></i>AriaNg</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocorrect="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result"></div>

</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

  <a href="https://github.com/Starrynightzyq" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content">
            

  <div class="posts-expand">
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block " lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://zhouyuqian.com/2021/08/28/pve/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Fitz">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Fitz's Blog - 快乐学习每一天">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Proxmox VE 安装
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-08-28 00:38:20" itemprop="dateCreated datePublished" datetime="2021-08-28T00:38:20+08:00">2021-08-28</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Geek/" itemprop="url" rel="index"><span itemprop="name">Geek</span></a>
                </span>
            </span>

          <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="fa fa-file-word-o"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>6.6k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="fa fa-clock-o"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>6 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="whats-proxmox-ve">What's Proxmox VE</h1>
<p><strong>Proxmox Virtual Environment</strong> is an open source server virtualization management solution based on QEMU/KVM and LXC. You can manage virtual machines, containers, highly available clusters, storage and networks with an integrated, easy-to-use web interface or via CLI. Proxmox VE code is licensed under the GNU Affero General Public License, version 3. The project is developed and maintained by <a target="_blank" rel="noopener" href="https://www.proxmox.com/">Proxmox Server Solutions GmbH</a>.</p>
<a id="more"></a>
<h1 id="安装">安装</h1>
<blockquote>
<p>Ref:</p>
<p>https://zhuanlan.zhihu.com/p/62084071</p>
<p>https://einverne.github.io/post/2020/03/proxmox-install-and-setup.html</p>
</blockquote>
<h1 id="安装-win10">安装 win10</h1>
<blockquote>
<p>Ref:</p>
<p>https://zhuanlan.zhihu.com/p/62492187</p>
</blockquote>
<h2 id="显卡直通">显卡直通</h2>
<blockquote>
<p>Ref：<a target="_blank" rel="noopener" href="https://www.simaek.com/archives/69/">PVE下安装Windows10并直通核显、键盘鼠标、声卡等设备详细步骤</a></p>
</blockquote>
<h1 id="安装-linux">安装 linux</h1>
<blockquote>
<p>Ref:</p>
<p>https://post.smzdm.com/p/a78egn7o/</p>
<p><a href="p3terx.com/archives/docker-aria2-pro.html">server</a></p>
</blockquote>
<h2 id="ubuntu--vg-ubuntu--lv-磁盘扩容">ubuntu--vg-ubuntu--lv 磁盘扩容</h2>
<blockquote>
<p>Ref: https://serverfault.com/questions/953174/how-do-i-expand-the-roots-volume-size</p>
</blockquote>
<p>First, you can use <code>lvextend</code> to extend the size of the logical volume, to fill up the remaining space:</p>
<figure class="highlight brainfuck"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">sudo</span> <span class="comment">lvextend</span> --<span class="comment">extents</span> <span class="literal">+</span><span class="comment">100%FREE</span> <span class="comment">/dev/mapper/ubuntu</span>--<span class="comment">vg</span><span class="literal">-</span><span class="comment">ubuntu</span>--<span class="comment">lv</span></span><br></pre></td></tr></table></figure>
<p>Now, you can resize the filesystem in that logical volume.</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo resize2fs <span class="regexp">/dev/m</span>apper/ubuntu--vg-ubuntu--lv</span><br></pre></td></tr></table></figure>
<p>Finally, you can see the end result:</p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">sudo</span> df -h /</span><br></pre></td></tr></table></figure>
<h2 id="安装qemu-guest-agent">安装qemu-guest-agent</h2>
<ul>
<li>参考https://pve.proxmox.com/wiki/Qemu-guest-agent</li>
<li>https://foxi.buduanwang.vip/virtualization/pve/530.html/</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">apt-get install qemu-guest-agent</span><br><span class="line">apt-get install spice-vdagent</span><br></pre></td></tr></table></figure>
<p>然后打开 “数据中心-&gt;pve-&gt;VMname-&gt;选项-&gt;QEMU Guest Agent”</p>
<h1 id="安装-openmediavault">安装 openmediavault</h1>
<blockquote>
<p>Ref:</p>
<p>https://www.d3tt.com/view/239</p>
</blockquote>
<h2 id="omv-磁盘丢失">omv 磁盘丢失</h2>
<p>OMV 断电后，没有卸载文档，直接将磁盘从omv硬盘接口取下，重启后提示 磁盘丢失。</p>
<blockquote>
<p>Ref: https://www.jianshu.com/p/5a78668b0670</p>
</blockquote>
<h2 id="omv-extras"><strong>omv-extras</strong></h2>
<blockquote>
<p>Ref: https://zhuanlan.zhihu.com/p/357495418</p>
</blockquote>
<h2 id="omv-decker">omv decker</h2>
<blockquote>
<p>Ref: https://zhuanlan.zhihu.com/p/360126067</p>
</blockquote>
<h1 id="pve删除lvm扩容步骤">pve删除lvm扩容步骤</h1>
<blockquote>
<p>Ref:</p>
<p>https://www.jianshu.com/p/bdb83531c56d</p>
<p>https://wp.gxnas.com/10402.html</p>
</blockquote>
<h1 id="防火墙">防火墙</h1>
<blockquote>
<p>Ref:</p>
<p>https://www.pianshen.com/article/72122018797/</p>
<p>https://foxi.buduanwang.vip/virtualization/pve/508.html/</p>
</blockquote>
<h1 id="spice远程连接">SPICE远程连接</h1>
<blockquote>
<p>Ref:</p>
<p>https://i.opat.vip/738.html</p>
</blockquote>
<h1 id="proxmox-ve直通硬盘全盘映射方式">Proxmox VE直通硬盘（全盘映射方式）</h1>
<blockquote>
<p>Ref:</p>
<p>https://wangxingcs.com/2020/0227/1411/</p>
</blockquote>
<h1 id="proxmox-ve-web-界面添加硬件温度显示cpu温度和硬盘温度都显示">Proxmox VE web 界面添加硬件温度显示(CPU温度和硬盘温度都显示)</h1>
<blockquote>
<p>Ref:</p>
<p>https://www.sjrkhb.com/article/3.html</p>
<p>https://oswu.cc/?p=99</p>
</blockquote>
<h2 id="安装温度检测软件">安装温度检测软件</h2>
<h3 id="cpu-及主板温度检测lm-sensors">CPU 及主板温度检测：lm-sensors</h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install lm-sensors</span><br></pre></td></tr></table></figure>
<p>安装完成后执行 <code>sensors-detect</code> 进行传感器探测，<strong>通常情况下</strong>全部默认选择 yes 即可</p>
<p>探测完成后执行 <code>sensors</code> 测试传感器</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># fitz @ pve in ~ [11:09:27]</span></span><br><span class="line">$ sensors</span><br><span class="line">coretemp-isa-0000</span><br><span class="line">Adapter: ISA adapter</span><br><span class="line">Package id 0:  +25.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 0:        +22.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 1:        +21.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 2:        +23.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 3:        +25.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 4:        +22.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 5:        +21.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 6:        +24.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line">Core 7:        +22.0°C  (high = +86.0°C, crit = +100.0°C)</span><br><span class="line"></span><br><span class="line">nvme-pci-0400</span><br><span class="line">Adapter: PCI adapter</span><br><span class="line">Composite:    +30.9°C  (low  = -273.1°C, high = +83.8°C)</span><br><span class="line">                       (crit = +84.8°C)</span><br><span class="line">Sensor 1:     +30.9°C  (low  = -273.1°C, high = +65261.8°C)</span><br><span class="line">Sensor 2:     +29.9°C  (low  = -273.1°C, high = +65261.8°C)</span><br><span class="line"></span><br><span class="line">acpitz-acpi-0</span><br><span class="line">Adapter: ACPI interface</span><br><span class="line">temp1:        +27.8°C  (crit = +119.0°C)</span><br><span class="line"></span><br><span class="line">iwlwifi_1-virtual-0</span><br><span class="line">Adapter: Virtual device</span><br><span class="line">temp1:            N/A</span><br><span class="line"></span><br><span class="line">nvme-pci-0200</span><br><span class="line">Adapter: PCI adapter</span><br><span class="line">Composite:    +26.9°C  (low  = -273.1°C, high = +84.8°C)</span><br><span class="line">                       (crit = +84.8°C)</span><br><span class="line">Sensor 1:     +26.9°C  (low  = -273.1°C, high = +65261.8°C)</span><br><span class="line">Sensor 2:     +24.9°C  (low  = -273.1°C, high = +65261.8°C)</span><br></pre></td></tr></table></figure>
<p>在如上输出中，“acpitz-acpi-0” 是主板温度，“coretemp-isa-0000” 是 CPU 温度。</p>
<h3 id="硬盘温度检测hddtemp">硬盘温度检测：hddtemp</h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">user@pve:~$ sudo apt install hddtemp</span><br></pre></td></tr></table></figure>
<p>安装完成后执行 <code>hddtemp /dev/sd?</code> 测试传感器</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">user@pve:~$ sudo hddtemp /dev/sd?/dev/sda: WDC WD40EZRZ-00WN9B0: 29°C</span><br><span class="line">/dev/sdb: ADATA SP600: 26°C</span><br><span class="line">/dev/sdc: WD2500: 29°C</span><br><span class="line">/dev/sdd: ADATA SP900: 38°C</span><br></pre></td></tr></table></figure>
<p>由于 PVE 的 web 服务以用户 www-data 身份运行，需要修改 hddtemp 的权限</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">user@pve:~$ sudo chmod +s /usr/sbin/hddtemp</span><br></pre></td></tr></table></figure>
<h2 id="编辑-pve-web-服务文件">编辑 PVE web 服务文件</h2>
<h3 id="nodes.pm">Nodes.pm</h3>
<p>编辑文件 <code>/usr/share/perl5/PVE/API2/Nodes.pm</code>，跳转到 <code>my $dinfo = df('/', 1);</code> 位置，编辑成如下所示</p>
<figure class="highlight perl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># ...[OMITTED]...</span></span><br><span class="line">        $res-&gt;&#123;pveversion&#125; = PVE::pvecfg::<span class="keyword">package</span>() . <span class="string">&quot;/&quot;</span> .</span><br><span class="line">            PVE::pvecfg::version_text();</span><br><span class="line"></span><br><span class="line">        $res-&gt;&#123;temperatures&#125; = <span class="string">`sensors`</span>;  <span class="comment"># 添加此行以获取 CPU 与主板温度</span></span><br><span class="line"></span><br><span class="line">        $res-&gt;&#123;hdd_temperatures&#125; = <span class="string">`hddtemp /dev/sd?`</span>;  <span class="comment"># 添加此行以获取硬盘温度</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">my</span> $dinfo = df(<span class="string">&#x27;/&#x27;</span>, <span class="number">1</span>);     <span class="comment"># output is bytes# ...[OMITTED]...</span></span><br></pre></td></tr></table></figure>
<h3 id="pvemanagerlib.js">pvemanagerlib.js</h3>
<h3 id="修改页面样式以完整显示数据">修改页面样式以完整显示数据</h3>
<p>编辑文件 <code>/usr/share/pve-manager/js/pvemanagerlib.js</code>，跳转到 <code>gettext('Status') + ': ' + zpool,</code> 位置，编辑成如下所示</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// ...[OMITTED]...</span></span><br><span class="line"> <span class="keyword">var</span> win = Ext.create(<span class="string">&#x27;Ext.window.Window&#x27;</span>, &#123;</span><br><span class="line">            modal: <span class="literal">true</span>,</span><br><span class="line">            width: <span class="number">800</span>,</span><br><span class="line">            height: <span class="number">500</span>,  <span class="comment">// 原始值为 400</span></span><br><span class="line">            resizable: <span class="literal">true</span>,</span><br><span class="line">            layout: <span class="string">&#x27;fit&#x27;</span>,</span><br><span class="line">            title: gettext(<span class="string">&#x27;Status&#x27;</span>) + <span class="string">&#x27;: &#x27;</span> + zpool,</span><br><span class="line">            items:[&#123;<span class="comment">// ...[OMITTED]...</span></span><br></pre></td></tr></table></figure>
<p>跳转到 <code>widget.pveNodeStatus</code> 位置，编辑成如下所示</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// ...[OMITTED]...Ext.define(&#x27;PVE.node.StatusView&#x27;, &#123;</span></span><br><span class="line">    extend: <span class="string">&#x27;PVE.panel.StatusView&#x27;</span>,</span><br><span class="line">    alias: <span class="string">&#x27;widget.pveNodeStatus&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    height: <span class="number">400</span>,  <span class="comment">// 原始值为 300</span></span><br><span class="line">    bodyPadding: <span class="string">&#x27;20 15 20 15&#x27;</span>,</span><br><span class="line"></span><br><span class="line">    layout: &#123;<span class="comment">// ...[OMITTED]...</span></span><br></pre></td></tr></table></figure>
<p><strong>两处 <code>height</code> 的值需按情况修改，每多一行数据增加 20</strong></p>
<p>例如有 1 行 CPU 与主板温度数据、3 行硬盘温度数据（3 块硬盘），即为 480 与 380</p>
<h3 id="添加显示内容">添加显示内容</h3>
<p>跳转到 <code>PVE Manager Version</code> 位置，编辑成如下所示</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// ...[OMITTED]...</span></span><br><span class="line">        &#123;</span><br><span class="line">            itemId: <span class="string">&#x27;version&#x27;</span>,</span><br><span class="line">            colspan: <span class="number">2</span>,</span><br><span class="line">            printBar: <span class="literal">false</span>,</span><br><span class="line">            title: gettext(<span class="string">&#x27;PVE Manager Version&#x27;</span>),</span><br><span class="line">            textField: <span class="string">&#x27;pveversion&#x27;</span>,</span><br><span class="line">            value: <span class="string">&#x27;&#x27;</span></span><br><span class="line">        &#125;,  <span class="comment">// 注意添加逗号</span></span><br><span class="line">        &#123;</span><br><span class="line">            itemId: <span class="string">&#x27;temperatures&#x27;</span>,</span><br><span class="line">            colspan: <span class="number">2</span>,</span><br><span class="line">            printBar: <span class="literal">false</span>,</span><br><span class="line">            title: gettext(<span class="string">&#x27;Temperatures&#x27;</span>),</span><br><span class="line">            textField: <span class="string">&#x27;temperatures&#x27;</span>,</span><br><span class="line">            renderer: <span class="function"><span class="keyword">function</span>(<span class="params">value</span>) </span>&#123;</span><br><span class="line">                value = value.replace(<span class="regexp">/Â/g</span>, <span class="string">&#x27;&#x27;</span>);</span><br><span class="line">                <span class="keyword">let</span> data = [];</span><br><span class="line">                <span class="keyword">let</span> cpus = value.matchAll(<span class="regexp">/^coretemp-isa-(\d&#123;4&#125;)$\n.*?\n((?:Package|Core)[\s\S]*?^\n)+/gm</span>);</span><br><span class="line">                <span class="keyword">for</span> (<span class="keyword">const</span> cpu <span class="keyword">of</span> cpus) &#123;</span><br><span class="line">                    <span class="keyword">let</span> cpuNumber = <span class="built_in">parseInt</span>(cpu[<span class="number">1</span>], <span class="number">10</span>);</span><br><span class="line">                    data[cpuNumber] = &#123;</span><br><span class="line">                        packages: [],</span><br><span class="line">                        cores: []</span><br><span class="line">                    &#125;;</span><br><span class="line"></span><br><span class="line">                    <span class="keyword">let</span> packages = cpu[<span class="number">2</span>].matchAll(<span class="regexp">/^Package id \d+:\s*([^°]+).*$/gm</span>);</span><br><span class="line">                    <span class="keyword">for</span> (<span class="keyword">const</span> package <span class="keyword">of</span> packages) &#123;</span><br><span class="line">                        data[cpuNumber][<span class="string">&#x27;packages&#x27;</span>].push(package[<span class="number">1</span>]);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    <span class="keyword">let</span> cores = cpu[<span class="number">2</span>].matchAll(<span class="regexp">/^Core \d+:\s*([^°]+).*$/gm</span>);</span><br><span class="line">                    <span class="keyword">for</span> (<span class="keyword">const</span> core <span class="keyword">of</span> cores) &#123;</span><br><span class="line">                        data[cpuNumber][<span class="string">&#x27;cores&#x27;</span>].push(core[<span class="number">1</span>]);</span><br><span class="line">                    &#125;</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                <span class="keyword">let</span> output = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">                <span class="keyword">for</span> (<span class="keyword">const</span> [i, cpu] <span class="keyword">of</span> data.entries()) &#123;</span><br><span class="line">                    output += <span class="string">`CPU <span class="subst">$&#123;i&#125;</span>: `</span>;</span><br><span class="line">                    <span class="keyword">if</span> (cpu.packages.length &gt; <span class="number">0</span>) &#123;</span><br><span class="line">                        <span class="keyword">for</span> (<span class="keyword">const</span> packageTemp <span class="keyword">of</span> cpu.packages) &#123;</span><br><span class="line">                            output += <span class="string">`<span class="subst">$&#123;packageTemp&#125;</span>°C `</span>;</span><br><span class="line">                        &#125;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span> (cpu.cores.length &gt; <span class="number">0</span>) &#123;</span><br><span class="line">                        output += <span class="string">&#x27;(&#x27;</span>;</span><br><span class="line">                        <span class="keyword">for</span> (<span class="keyword">const</span> coreTemp <span class="keyword">of</span> cpu.cores) &#123;</span><br><span class="line">                            output += <span class="string">`<span class="subst">$&#123;coreTemp&#125;</span>, `</span>;</span><br><span class="line">                        &#125;</span><br><span class="line">                        output = output.slice(<span class="number">0</span>, -<span class="number">2</span>);</span><br><span class="line">                        output += <span class="string">&#x27;)°C&#x27;</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    output += <span class="string">&#x27; | &#x27;</span>;</span><br><span class="line">                &#125;</span><br><span class="line"></span><br><span class="line">                <span class="keyword">let</span> boardTemp = value.match(<span class="regexp">/^acpitz-acpi-\d+$\n.*?\n^temp1:\s*([^°]+).*$/m</span>);</span><br><span class="line">                <span class="keyword">if</span> (boardTemp.length &gt; <span class="number">0</span>) &#123;</span><br><span class="line">                    output += <span class="string">`Board: <span class="subst">$&#123;boardTemp[<span class="number">1</span>]&#125;</span>°C | `</span></span><br><span class="line">                &#125;</span><br><span class="line">                output = output.slice(<span class="number">0</span>, -<span class="number">3</span>);</span><br><span class="line"></span><br><span class="line">                <span class="keyword">return</span> output;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;,</span><br><span class="line">        &#123;</span><br><span class="line">            itemId: <span class="string">&#x27;hdd-temperatures&#x27;</span>,</span><br><span class="line">            colspan: <span class="number">2</span>,</span><br><span class="line">            printBar: <span class="literal">false</span>,</span><br><span class="line">            title: gettext(<span class="string">&#x27;HDD Temperatures&#x27;</span>),</span><br><span class="line">            textField: <span class="string">&#x27;hdd_temperatures&#x27;</span>,</span><br><span class="line">            renderer: <span class="function"><span class="keyword">function</span>(<span class="params">value</span>) </span>&#123;</span><br><span class="line">                value = value.replace(<span class="regexp">/Â/g</span>, <span class="string">&#x27;&#x27;</span>);</span><br><span class="line">                <span class="keyword">return</span> value.replace(<span class="regexp">/\n/g</span>, <span class="string">&#x27;&lt;br&gt;&#x27;</span>)</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    ],<span class="comment">// ...[OMITTED]...</span></span><br></pre></td></tr></table></figure>
<p>其中处理数据的正则式与返回值可能需按实际情况进行修改</p>
<h2 id="完成">完成</h2>
<p>执行 <code>systemctl restart pveproxy</code> 重启 PVE web 服务</p>
<p><strong>在浏览器中清除 PVE 控制台的缓存</strong>，重新加载即可在节点概要显示温度信息</p>
<figure>
<img src="https://pic.zhouyuqian.com/img/202202141121253.png" alt="pve-temperatures"><figcaption aria-hidden="true">pve-temperatures</figcaption>
</figure>

    </div>

    
    
    

    <div>
      
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------The end of this article&nbsp;<i class="fa fa-paw"></i>&nbsp;Thank you for your reading-------</div>
    
</div>
      
    </div>
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>Fitz
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="https://zhouyuqian.com/2021/08/28/pve/" title="Proxmox VE 安装">https://zhouyuqian.com/2021/08/28/pve/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/zh" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Geek/" <i class="fa fa-tag"></i> Geek</a>
              <a href="/tags/PVE/" <i class="fa fa-tag"></i> PVE</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/07/24/nginx/" rel="prev" title="Nginx 反向代理">
      <i class="fa fa-chevron-left"></i> Nginx 反向代理
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/08/29/tinc/" rel="next" title="tinc 安装">
      tinc 安装 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  

  </div>


          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#whats-proxmox-ve"><span class="nav-number">1.</span> <span class="nav-text">What&#39;s Proxmox VE</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%89%E8%A3%85"><span class="nav-number">2.</span> <span class="nav-text">安装</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-win10"><span class="nav-number">3.</span> <span class="nav-text">安装 win10</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%98%BE%E5%8D%A1%E7%9B%B4%E9%80%9A"><span class="nav-number">3.1.</span> <span class="nav-text">显卡直通</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-linux"><span class="nav-number">4.</span> <span class="nav-text">安装 linux</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#ubuntu--vg-ubuntu--lv-%E7%A3%81%E7%9B%98%E6%89%A9%E5%AE%B9"><span class="nav-number">4.1.</span> <span class="nav-text">ubuntu--vg-ubuntu--lv 磁盘扩容</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85qemu-guest-agent"><span class="nav-number">4.2.</span> <span class="nav-text">安装qemu-guest-agent</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-openmediavault"><span class="nav-number">5.</span> <span class="nav-text">安装 openmediavault</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#omv-%E7%A3%81%E7%9B%98%E4%B8%A2%E5%A4%B1"><span class="nav-number">5.1.</span> <span class="nav-text">omv 磁盘丢失</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#omv-extras"><span class="nav-number">5.2.</span> <span class="nav-text">omv-extras</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#omv-decker"><span class="nav-number">5.3.</span> <span class="nav-text">omv decker</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#pve%E5%88%A0%E9%99%A4lvm%E6%89%A9%E5%AE%B9%E6%AD%A5%E9%AA%A4"><span class="nav-number">6.</span> <span class="nav-text">pve删除lvm扩容步骤</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E9%98%B2%E7%81%AB%E5%A2%99"><span class="nav-number">7.</span> <span class="nav-text">防火墙</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#spice%E8%BF%9C%E7%A8%8B%E8%BF%9E%E6%8E%A5"><span class="nav-number">8.</span> <span class="nav-text">SPICE远程连接</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#proxmox-ve%E7%9B%B4%E9%80%9A%E7%A1%AC%E7%9B%98%E5%85%A8%E7%9B%98%E6%98%A0%E5%B0%84%E6%96%B9%E5%BC%8F"><span class="nav-number">9.</span> <span class="nav-text">Proxmox VE直通硬盘（全盘映射方式）</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#proxmox-ve-web-%E7%95%8C%E9%9D%A2%E6%B7%BB%E5%8A%A0%E7%A1%AC%E4%BB%B6%E6%B8%A9%E5%BA%A6%E6%98%BE%E7%A4%BAcpu%E6%B8%A9%E5%BA%A6%E5%92%8C%E7%A1%AC%E7%9B%98%E6%B8%A9%E5%BA%A6%E9%83%BD%E6%98%BE%E7%A4%BA"><span class="nav-number">10.</span> <span class="nav-text">Proxmox VE web 界面添加硬件温度显示(CPU温度和硬盘温度都显示)</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85%E6%B8%A9%E5%BA%A6%E6%A3%80%E6%B5%8B%E8%BD%AF%E4%BB%B6"><span class="nav-number">10.1.</span> <span class="nav-text">安装温度检测软件</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#cpu-%E5%8F%8A%E4%B8%BB%E6%9D%BF%E6%B8%A9%E5%BA%A6%E6%A3%80%E6%B5%8Blm-sensors"><span class="nav-number">10.1.1.</span> <span class="nav-text">CPU 及主板温度检测：lm-sensors</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%A1%AC%E7%9B%98%E6%B8%A9%E5%BA%A6%E6%A3%80%E6%B5%8Bhddtemp"><span class="nav-number">10.1.2.</span> <span class="nav-text">硬盘温度检测：hddtemp</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%BC%96%E8%BE%91-pve-web-%E6%9C%8D%E5%8A%A1%E6%96%87%E4%BB%B6"><span class="nav-number">10.2.</span> <span class="nav-text">编辑 PVE web 服务文件</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#nodes.pm"><span class="nav-number">10.2.1.</span> <span class="nav-text">Nodes.pm</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#pvemanagerlib.js"><span class="nav-number">10.2.2.</span> <span class="nav-text">pvemanagerlib.js</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BF%AE%E6%94%B9%E9%A1%B5%E9%9D%A2%E6%A0%B7%E5%BC%8F%E4%BB%A5%E5%AE%8C%E6%95%B4%E6%98%BE%E7%A4%BA%E6%95%B0%E6%8D%AE"><span class="nav-number">10.2.3.</span> <span class="nav-text">修改页面样式以完整显示数据</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%B7%BB%E5%8A%A0%E6%98%BE%E7%A4%BA%E5%86%85%E5%AE%B9"><span class="nav-number">10.2.4.</span> <span class="nav-text">添加显示内容</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%8C%E6%88%90"><span class="nav-number">10.3.</span> <span class="nav-text">完成</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Fitz"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Fitz</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">78</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">25</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">52</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/Starrynightzyq" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;Starrynightzyq" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:starrynightzyq@gmail.com" title="E-Mail → mailto:starrynightzyq@gmail.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://space.bilibili.com/57711842" title="Bilibili → https:&#x2F;&#x2F;space.bilibili.com&#x2F;57711842" rel="noopener" target="_blank"><i class="fa fa-fw fa-custom bilibili"></i>Bilibili</a>
      </span>
      <span class="links-of-author-item">
        <a href="http://wpa.qq.com/msgrd?v=3&uin=2421854978&site=qq&menu=yes" title="QQ → http:&#x2F;&#x2F;wpa.qq.com&#x2F;msgrd?v&#x3D;3&amp;uin&#x3D;2421854978&amp;site&#x3D;qq&amp;menu&#x3D;yes" rel="noopener" target="_blank"><i class="fa fa-fw fa-custom qq"></i>QQ</a>
      </span>
  </div>


  <div class="links-of-blogroll motion-element">
    <div class="links-of-blogroll-title">
      <i class="fa fa-fw fa-link"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="http://leiblog.wang/" title="http:&#x2F;&#x2F;leiblog.wang" rel="noopener" target="_blank">Lei Blog</a>
        </li>
    </ul>
  </div>

      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        
  <div class="beian"><a href="http://beian.miit.gov.cn/" rel="noopener" target="_blank">苏ICP备20042287号 </a>
  </div>

<div class="copyright">
  
  &copy; 2018 – 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Fitz</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    <span title="站点总字数">251k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">3:48</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v5.3.0
  </div>
  <span class="post-meta-divider">|</span>
  <div class="theme-info">主题 – <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> v7.7.2
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/theme-next/theme-next-pjax@0/pjax.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>

<script src="/js/bookmark.js"></script>

  <script>
var pjax = new Pjax({
  selectors: [
    'head title',
    '#page-configurations',
    '.content-wrap',
    '.post-toc-wrap',
    '#pjax'
  ],
  switches: {
    '.post-toc-wrap': Pjax.switches.innerHTML
  },
  analytics: false,
  cacheBust: false,
  scrollTo : !CONFIG.bookmark.enable
});

window.addEventListener('pjax:success', () => {
  document.querySelectorAll('script[pjax], script#page-configurations, #pjax script').forEach(element => {
    var code = element.text || element.textContent || element.innerHTML || '';
    var parent = element.parentNode;
    parent.removeChild(element);
    var script = document.createElement('script');
    if (element.id) {
      script.id = element.id;
    }
    if (element.className) {
      script.className = element.className;
    }
    if (element.type) {
      script.type = element.type;
    }
    if (element.src) {
      script.src = element.src;
      // Force synchronous loading of peripheral JS.
      script.async = false;
    }
    if (element.getAttribute('pjax') !== null) {
      script.setAttribute('pjax', '');
    }
    if (code !== '') {
      script.appendChild(document.createTextNode(code));
    }
    parent.appendChild(script);
  });
  NexT.boot.refresh();
  // Define Motion Sequence & Bootstrap Motion.
  if (CONFIG.motion.enable) {
    NexT.motion.integrator
      .init()
      .add(NexT.motion.middleWares.subMenu)
      .add(NexT.motion.middleWares.postList)
      .bootstrap();
  }
  NexT.utils.updateSidebarPosition();
});
</script>




  




  
<script src="/js/local-search.js"></script>













    <div id="pjax">
  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

    </div>

  <!-- 页面点击小红心 -->
  <!-- <script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script> -->
  <script type="text/javascript" src="/js/clicklove.js"></script><!-- hexo-inject:begin --><!-- hexo-inject:end -->
</body>
</html>
